Optimal. Leaf size=82 \[ \frac {\tanh ^{-1}(\sin (c+d x))}{8 a^3 d}+\frac {1}{6 d (a+a \sin (c+d x))^3}-\frac {1}{8 a d (a+a \sin (c+d x))^2}-\frac {1}{8 d \left (a^3+a^3 \sin (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2786, 78, 212}
\begin {gather*} -\frac {1}{8 d \left (a^3 \sin (c+d x)+a^3\right )}+\frac {\tanh ^{-1}(\sin (c+d x))}{8 a^3 d}-\frac {1}{8 a d (a \sin (c+d x)+a)^2}+\frac {1}{6 d (a \sin (c+d x)+a)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 212
Rule 2786
Rubi steps
\begin {align*} \int \frac {\tan (c+d x)}{(a+a \sin (c+d x))^3} \, dx &=\frac {\text {Subst}\left (\int \frac {x}{(a-x) (a+x)^4} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (-\frac {1}{2 (a+x)^4}+\frac {1}{4 a (a+x)^3}+\frac {1}{8 a^2 (a+x)^2}+\frac {1}{8 a^2 \left (a^2-x^2\right )}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {1}{6 d (a+a \sin (c+d x))^3}-\frac {1}{8 a d (a+a \sin (c+d x))^2}-\frac {1}{8 d \left (a^3+a^3 \sin (c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,a \sin (c+d x)\right )}{8 a^2 d}\\ &=\frac {\tanh ^{-1}(\sin (c+d x))}{8 a^3 d}+\frac {1}{6 d (a+a \sin (c+d x))^3}-\frac {1}{8 a d (a+a \sin (c+d x))^2}-\frac {1}{8 d \left (a^3+a^3 \sin (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 52, normalized size = 0.63 \begin {gather*} \frac {3 \tanh ^{-1}(\sin (c+d x))-\frac {2+9 \sin (c+d x)+3 \sin ^2(c+d x)}{(1+\sin (c+d x))^3}}{24 a^3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.26, size = 67, normalized size = 0.82
method | result | size |
derivativedivides | \(\frac {\frac {1}{6 \left (1+\sin \left (d x +c \right )\right )^{3}}-\frac {1}{8 \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {1}{8 \left (1+\sin \left (d x +c \right )\right )}+\frac {\ln \left (1+\sin \left (d x +c \right )\right )}{16}-\frac {\ln \left (\sin \left (d x +c \right )-1\right )}{16}}{d \,a^{3}}\) | \(67\) |
default | \(\frac {\frac {1}{6 \left (1+\sin \left (d x +c \right )\right )^{3}}-\frac {1}{8 \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {1}{8 \left (1+\sin \left (d x +c \right )\right )}+\frac {\ln \left (1+\sin \left (d x +c \right )\right )}{16}-\frac {\ln \left (\sin \left (d x +c \right )-1\right )}{16}}{d \,a^{3}}\) | \(67\) |
risch | \(-\frac {i \left (3 \,{\mathrm e}^{i \left (d x +c \right )}-14 \,{\mathrm e}^{3 i \left (d x +c \right )}-18 i {\mathrm e}^{2 i \left (d x +c \right )}+18 i {\mathrm e}^{4 i \left (d x +c \right )}+3 \,{\mathrm e}^{5 i \left (d x +c \right )}\right )}{12 d \,a^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{6}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 a^{3} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 a^{3} d}\) | \(125\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 98, normalized size = 1.20 \begin {gather*} -\frac {\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{2} + 9 \, \sin \left (d x + c\right ) + 2\right )}}{a^{3} \sin \left (d x + c\right )^{3} + 3 \, a^{3} \sin \left (d x + c\right )^{2} + 3 \, a^{3} \sin \left (d x + c\right ) + a^{3}} - \frac {3 \, \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{3}} + \frac {3 \, \log \left (\sin \left (d x + c\right ) - 1\right )}{a^{3}}}{48 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 154 vs.
\(2 (74) = 148\).
time = 0.36, size = 154, normalized size = 1.88 \begin {gather*} -\frac {6 \, \cos \left (d x + c\right )^{2} - 3 \, {\left (3 \, \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 4\right )} \sin \left (d x + c\right ) - 4\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (3 \, \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 4\right )} \sin \left (d x + c\right ) - 4\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 18 \, \sin \left (d x + c\right ) - 10}{48 \, {\left (3 \, a^{3} d \cos \left (d x + c\right )^{2} - 4 \, a^{3} d + {\left (a^{3} d \cos \left (d x + c\right )^{2} - 4 \, a^{3} d\right )} \sin \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\tan {\left (c + d x \right )}}{\sin ^{3}{\left (c + d x \right )} + 3 \sin ^{2}{\left (c + d x \right )} + 3 \sin {\left (c + d x \right )} + 1}\, dx}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 13.21, size = 81, normalized size = 0.99 \begin {gather*} \frac {\frac {6 \, \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a^{3}} - \frac {6 \, \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a^{3}} - \frac {11 \, \sin \left (d x + c\right )^{3} + 45 \, \sin \left (d x + c\right )^{2} + 69 \, \sin \left (d x + c\right ) + 19}{a^{3} {\left (\sin \left (d x + c\right ) + 1\right )}^{3}}}{96 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.82, size = 186, normalized size = 2.27 \begin {gather*} \frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,a^3\,d}+\frac {-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left (a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+15\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+20\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+15\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+6\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a^3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________